<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    var text1 = prompt('请输入第一个值')
    var text2 = prompt('请输入第二个值')
    if (text1 > text2) {
        alert('这个数大些' + text1)
    } else if (text1 == text2) {
        alert('他们是相等的')
    } else {
        alert('这个数大些' + text2)
    }
</script>

</html>